﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Collections.Generic;

namespace Legazpi.Payroll.DataAccess.DataObjects
{
    public class User : EntityBase<int>
    {
        [Required]
        [StringLength(128)]
        public string UserName { get; set; }

        [Required]
        [StringLength(250)]
        public string Password { get; set; }

        [StringLength(128)]
        public string Email { get; set; }

        public DateTime? DateAdded { get; set; }

        //many to many relation to Role
        public virtual ICollection<Role> Roles { get; set; }
        public User()
        {
            Roles = new HashSet<Role>();
        }
    }
}
